package com.neusoft.work.controller;

import com.neusoft.work.po.*;
import com.neusoft.work.service.DishService;
import com.neusoft.work.service.MealManagementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RequestMapping("/MealManagementController")
@RestController

public class MealManagementController {
    @Autowired
    private MealManagementService bas;


    @RequestMapping("/addMealManagement")
    public ResponseBean<Integer> addMealManagement(MealManagement bs) {
        return bas.addMealManagement(bs);
    }

    @RequestMapping("/deleteMealManagement")
    public ResponseBean<Integer> deleteMealManagement(Integer id){
        return bas.deleteMealManagement(id);
    }

    @RequestMapping("/updateMealManagement")
    public ResponseBean<Integer> updateMealManagement(MealManagement bs){
        return bas.updateMealManagement(bs);
    }

    @RequestMapping("/queryMealManagementByName")
    public PageResponseBean<List<MealManagement>> queryMealManagementByName(String name,Long cur,Long number) {
        return bas.queryMealManagementByName(name, cur, number);
    }

}
